/* ============================================
   HSO Corporate – Referenzen Page
   Extends hsocorporate.css (Sage / Cobalt / Shark)
   Prefix: ref-
   ============================================ */


/* ============================================
   REVEAL SYSTEM
   ============================================ */

[data-ref-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-ref-reveal].ref-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Image clip-path reveal */
.ref-objekt__media[data-ref-reveal] {
  transform: none;
  clip-path: inset(6% 6% 6% 6% round 14px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.ref-objekt__media[data-ref-reveal].ref-visible {
  clip-path: inset(0% 0% 0% 0% round 14px);
}


/* ============================================
   HERO
   ============================================ */

@keyframes refFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes refLineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes refBgZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

@keyframes refScrollPulse {
  0%, 100% { transform: scaleY(1);   opacity: 0.4; }
  50%      { transform: scaleY(0.5); opacity: 1; }
}

@keyframes refFloat {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(var(--tx, 40px), var(--ty, -40px)); }
}

.ref-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ref-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ref-hero__bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: refBgZoom 12s ease-out forwards;
}

.ref-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(37, 44, 55, 0.45) 0%,
      rgba(37, 44, 55, 0.78) 60%,
      rgba(37, 44, 55, 0.94) 100%
    );
}

.ref-hero__overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 55% 45% at 50% 65%,
    rgba(193, 203, 184, 0.1) 0%,
    transparent 65%
  );
}

.ref-hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.ref-hero__particle {
  position: absolute;
  border-radius: 50%;
  background: var(--sage);
  animation: refFloat var(--dur, 10s) var(--del, 0s) ease-in-out infinite alternate;
  pointer-events: none;
}

.ref-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: clamp(7rem, 14vw, 11rem);
  padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.ref-hero__label {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1.25rem;
  animation: refFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.ref-hero__headline {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(2.5rem, 5vw + 0.75rem, 4.5rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin-bottom: 1rem;
  animation: refFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.ref-hero__headline em {
  font-family: 'Thirsty Rough', 'Geared Slab', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  color: var(--sage);
}

.ref-hero__subtitle {
  font-family: 'Lato', sans-serif;
  font-size: clamp(0.95rem, 1.1vw + 0.4rem, 1.15rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.75;
  max-width: 460px;
  margin-inline: auto;
  animation: refFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

.ref-hero__line {
  width: 48px;
  height: 3px;
  background: var(--sage);
  border-radius: 2px;
  margin: 1.75rem auto 0;
  transform-origin: center;
  animation: refLineGrow 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
  opacity: 0.6;
}

.ref-hero__scroll {
  position: absolute;
  bottom: 2rem;
  right: clamp(1.5rem, 4vw, 3rem);
  z-index: 3;
  opacity: 0.45;
  transition: opacity 0.3s;
}
.ref-hero__scroll:hover { opacity: 1; }

.ref-hero__scroll-line {
  width: 1px;
  height: 55px;
  background: linear-gradient(to bottom, transparent, var(--sage));
  animation: refScrollPulse 2.5s ease-in-out infinite;
}


/* ============================================
   PORTFOLIO / OBJEKTE
   ============================================ */

.ref-portfolio {
  background: var(--white);
  padding-block: clamp(5rem, 9vw, 8rem);
}

.ref-portfolio__header {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.ref-portfolio__header-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
}

.ref-portfolio__headline {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(2rem, 3vw + 0.5rem, 3rem);
  font-weight: 800;
  color: var(--shark);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.ref-portfolio__intro {
  font-family: 'Lato', sans-serif;
  font-size: 0.92rem;
  color: var(--shark-60);
  line-height: 1.75;
}

/* Objekt card */
.ref-objekt {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--shark-08);
}

.ref-objekt:last-child { border-bottom: none; }

.ref-objekt--flipped {
  grid-template-columns: 1fr 1.2fr;
}

.ref-objekt--flipped .ref-objekt__media {
  order: 1;
}

.ref-objekt--flipped .ref-objekt__content {
  order: 0;
}

.ref-objekt__image {
  aspect-ratio: 3/2;
  border-radius: 14px;
  overflow: hidden;
  background: #d8d8d8;
  position: relative;
  box-shadow: 0 10px 36px rgba(37, 44, 55, 0.08);
}

.ref-objekt__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.ref-objekt__image:hover img { transform: scale(1.04); }

.ref-objekt__image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e0e0e0, #c8c8c8);
  z-index: 0;
}

/* Content */
.ref-objekt__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.ref-objekt__type {
  font-family: 'Lato', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.ref-objekt__divider {
  width: 24px;
  height: 2px;
  background: var(--sage);
  border-radius: 1px;
  opacity: 0.6;
}

.ref-objekt__location {
  font-family: 'Lato', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--shark-60);
}

.ref-objekt__title {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(1.4rem, 2vw + 0.4rem, 1.85rem);
  font-weight: 800;
  color: var(--shark);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
}

.ref-objekt__desc {
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  color: var(--shark-60);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.ref-objekt__stats {
  display: flex;
  gap: 2rem;
}

.ref-objekt__stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ref-objekt__stat-value {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--shark);
}

.ref-objekt__stat-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--shark-60);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* ============================================
   TESTIMONIALS
   ============================================ */

.ref-testimonials {
  background: var(--off-white);
  padding-block: clamp(5rem, 9vw, 8rem);
}

.ref-testimonials__header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.ref-testimonials__headline {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(2rem, 3vw + 0.5rem, 3rem);
  font-weight: 800;
  color: var(--shark);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.ref-testimonials__sub {
  font-family: 'Lato', sans-serif;
  font-size: 0.92rem;
  color: var(--shark-60);
}

.ref-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.ref-testimonial {
  padding: 2rem 1.75rem;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--shark-08);
  position: relative;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s;
}

.ref-testimonial:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(37, 44, 55, 0.08);
  border-color: var(--sage-40);
}

.ref-testimonial__quote-mark {
  font-family: 'Geared Slab', Georgia, serif;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--sage);
  opacity: 0.5;
  margin-bottom: -0.5rem;
}

.ref-testimonial__quote {
  font-family: 'Lato', sans-serif;
  font-size: 0.92rem;
  color: var(--shark);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.ref-testimonial__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ref-testimonial__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sage-20);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.ref-testimonial__avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, var(--sage-40) 30%, transparent 70%);
}

.ref-testimonial__name {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--shark);
}

.ref-testimonial__role {
  font-family: 'Lato', sans-serif;
  font-size: 0.75rem;
  color: var(--shark-60);
  margin-top: 0.1rem;
}


/* ============================================
   IMPRESSIONEN – DOUBLE ANIMATED SLIDER
   ============================================ */

@keyframes refSlideLeft {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

@keyframes refSlideRight {
  from { transform: translate3d(-50%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

.ref-gallery {
  background: var(--white);
  padding-block: clamp(5rem, 9vw, 8rem);
  overflow: hidden;
}

.ref-gallery__header {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.ref-gallery__headline {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(1.75rem, 2.5vw + 0.5rem, 2.5rem);
  font-weight: 800;
  color: var(--shark);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.ref-gallery__sub {
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  color: var(--shark-60);
}

/* Slider wrapper */
.ref-slider {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Each row */
.ref-slider__row {
  overflow: hidden;
  contain: layout style paint;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
}

/* Track – contains original + duplicate slides */
.ref-slider__track {
  display: flex;
  gap: 1rem;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Direction */
.ref-slider__row[data-direction="left"] .ref-slider__track {
  animation: refSlideLeft 35s linear infinite;
}

.ref-slider__row[data-direction="right"] .ref-slider__track {
  animation: refSlideRight 35s linear infinite;
}

/* Individual slide */
.ref-slider__slide {
  flex: 0 0 auto;
  width: clamp(260px, 22vw, 380px);
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: #d8d8d8;
  position: relative;
}

.ref-slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.ref-slider__slide:hover img {
  transform: scale(1.06);
}

.ref-slider__slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e0e0e0, #c8c8c8);
  z-index: 0;
}


/* ============================================
   CLOSING CTA
   ============================================ */

.ref-cta {
  position: relative;
  padding-block: clamp(6rem, 11vw, 10rem);
  overflow: hidden;
}

.ref-cta__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ref-cta__bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.ref-cta__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(37, 44, 55, 0.7) 0%,
      rgba(37, 44, 55, 0.9) 100%
    );
}

.ref-cta__overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 50% 45% at 50% 50%,
    rgba(193, 203, 184, 0.08) 0%,
    transparent 70%
  );
}

.ref-cta__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 520px;
  margin-inline: auto;
}

.ref-cta__label {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1rem;
}

.ref-cta__headline {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.75rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.ref-cta__text {
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  max-width: 400px;
  margin-inline: auto;
  margin-bottom: 2.25rem;
}

.ref-cta__actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .ref-portfolio__header-layout { grid-template-columns: 1fr; gap: 1rem; }
  .ref-testimonials__grid { grid-template-columns: 1fr; max-width: 500px; margin-inline: auto; }
  .ref-slider__slide { width: clamp(220px, 28vw, 320px); }
}

@media (max-width: 768px) {
  .ref-hero { min-height: 45vh; }
  .ref-hero__headline { font-size: clamp(2rem, 9vw, 3rem); }
  .ref-hero__scroll { display: none; }

  .ref-objekt,
  .ref-objekt--flipped {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ref-objekt--flipped .ref-objekt__media { order: 0; }
  .ref-objekt--flipped .ref-objekt__content { order: 1; }

  .ref-slider__slide { width: clamp(200px, 55vw, 280px); }
  .ref-slider { gap: 0.75rem; }

  .ref-cta__actions { flex-direction: column; }
  .ref-cta__actions .btn { width: 100%; justify-content: center; text-align: center; }

  .ref-objekt__media[data-ref-reveal] {
    clip-path: none;
    transform: translateY(28px);
  }
  .ref-objekt__media[data-ref-reveal].ref-visible {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-ref-reveal] {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .ref-hero__label,
  .ref-hero__headline,
  .ref-hero__subtitle,
  .ref-hero__line {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .ref-hero__bg-image { animation: none; }
  .ref-hero__scroll-line { animation: none; }
  .ref-hero__particle { animation: none; }
  .ref-slider__track { animation: none !important; }
}